﻿<?php 
include 'include/config.php';
include 'include/opendb.php';

//////////////////

if(isset($_GET["guid"])){
$fid=$_GET['guid'];   
mysql_query("set names 'utf8'");
$query="select * from ".$History_table." where GlobalUniqueIdentifier='".$fid."'";

$result = mysql_query($query) or die("检索出错");
if($result){ 
    echo "标本记录:urn:lsid:cvh.org.cn:specimen:".$fid."的鉴定历史<br>".
	    "<table border='1'><tr><td>科</td><td>学名</td><td>命名人</td><td>鉴定人</td><td>鉴定日期</td><td>鉴定依据</td></tr>";
		
 while($rows = mysql_fetch_assoc($result)) {
  if(strlen($row['LSID'])>2) $sname='<a href="lsid.php?lsid=urn:lsid:cvh.org.cn:names:'.$rows['LSID'].
   '" target="_blank" title="链接至该物种的LSID页面">'.$rows['ScientificName'].'</a>';
   else $sname='<a href="'.$lsid_reg.'" style="color:red" target="_blank" title="无对应的LSID页面，链接至主馆登记页面">'.$row['ScientificName'].'</a>';
   echo '<tr><td>'.$rows['Family'].'</td><td>'.$sname.'</td><td>'.$rows['AuthorYearOfScientificName'].
         '</td><td>'.$rows['IdentifiedBy'].'</td><td>'.$rows['DateIdentified'].'</td><td>'.$rows['RelatedInformation'].'</td></tr>';
 }
  echo '</table>';
}
else echo '没有鉴定历史';
}
?>